<%-- 
    Document   : index
    Created on : Apr 26, 2011, 9:51:12 PM
    Author     : Nightst4r
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        
        <script src="JS/webgl-utils.js"> </script>
        <script src="JS/ColladaScene.js"> </script>
    
    
    <script>
        var canvas = null;
        var gl = null;
        
        function render() {
            window.requestAnimFrame(render, canvas);
            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
            
        }
        
        function onload()
        {
            canvas = document.getElementById("glCanvas");
            gl = WebGLUtils.setupWebGL(canvas);
            gl.clearColor(0,1,0);
            
            var scene = new ColladaScene();
            scene.LoadURL(gl, "./Content/firefly.DAE");
            
            render();    
        }
        
    </script>
        
    </head>
    <body onload="onload();">
        <h1>Hello World!</h1>
        <canvas id="glCanvas"></canvas>
    </body>
</html>
